<!--_meta 作为公共模版分离出去-->
<?php $this->load->view('public/meta.html');?>
<!--/meta 作为公共模版分离出去-->

<title>添加属性</title>
</head>
<body>
<!--_header 作为公共模版分离出去-->
<?php $this->load->view('public/header.html');?>
<!--/_header 作为公共模版分离出去-->

<!--_menu 作为公共模版分离出去-->
<?php $this->load->view('public/menu.html');?>
<!--/_menu 作为公共模版分离出去-->
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 商品管理 <span class="c-gray en">&gt;</span> 添加属性 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="pd-20">
		<form action="<?php echo base_url();?>admin/attribute/insert" method="post" class="form form-horizontal" name="theForm">
			<div id="tab-category" class="HuiTab">
				<div class="tabCon">


					<div class="row cl">
						<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>属性名称：</label>
						<div class="formControls col-xs-8 col-sm-9">
							<input type="text" class="input-text" value="" placeholder="" id="" name="attr_name">
						</div>
						<div class="col-3"> </div>
					</div>
					
					<div class="row cl">
						<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>所属商品类型：</label>
						<div class="formControls col-xs-8 col-sm-9"> <span class="select-box">
							<select class="select" id="sel_Sub" name="type_id" onchange="SetSubID(this);">
								<option value="0">请选择...</option>
								<?php foreach($goodstypes as $v):?>
								<option value="<?php echo $v['type_id'];?>" <?php echo $v['type_id'] == $type_id ? "selected":"" ?>><?php echo $v['type_name'];?></option>
								<?php endforeach;?>
								
							</select>
							</span> </div>
						<div class="col-3"> </div>
					</div>


					<!--<div class="row cl">
						<label class="form-label col-xs-4 col-sm-3">排序值：</label>
						<div class="formControls col-xs-8 col-sm-9">
							<input type="text" class="input-text" value="100" placeholder="输入的值越小，栏目分类位置越靠前" id="" name="sort_order">
						</div>
						<div class="col-3"> </div>
					</div>-->
					
					
					<!--<div class="row cl">
						<label class="form-label col-xs-4 col-sm-3">属性是否可选：</label>
						<div class="formControls col-xs-8 col-sm-9 skin-minimal">
							<div class="radio-box">
								<input name="attr_type" value="0" checked="true" type="radio" id="attr_type-0" checked>
								<label for="attr_type-0"> 唯一属性</label>
							</div>
							<div class="radio-box">
								<input type="radio" id="attr_type-1" name="attr_type" value="1" checked="checked">
								<label for="attr_type-1">单选属性 </label>
							</div>
							<div class="radio-box">
								<input type="radio" id="attr_type-2" name="attr_type" value="2">
								<label for="attr_type-2"> 复选属性</label>
							</div>
						</div>
					</div>-->


					<div class="row cl">
						<label class="form-label col-xs-4 col-sm-3">该属性值的录入方式：</label>
						<div class="formControls col-xs-8 col-sm-9 skin-minimal">
							<div class="radio-box" onclick="radioClicked(0)" style="height:40px;">
								<input name="attr_input_type" value="0" checked="true"  type="radio" id="attr_input_type-0" checked>
								<label for="attr_input_type-0" onclick="radioClicked(0)" style="dispaly:inline-block;height:40px;"> 手工录入</label>
							</div>
							<div class="radio-box" onclick="radioClicked(1)" style="height:40px;">
								<input type="radio" id="attr_input_type-1" name="attr_input_type" value="1"  >
								<label for="attr_input_type-1" onclick="radioClicked(1)" style="dispaly:inline-block;height:40px;">前台可以展示多个属性（一行代表一个可选值） </label>
							</div>
							<!--<div class="radio-box" onclick="radioClicked(0)" style="height:40px;">
								<input type="radio" id="attr_input_type-2" name="attr_input_type" value="2" >
								<label for="attr_input_type-2" onclick="radioClicked(0)" style="dispaly:inline-block;height:40px;"> 多行文本框</label>
							</div>-->
						</div>
					</div>


					<div class="row cl">
						<label class="form-label col-xs-4 col-sm-3">可选值列表：</label>
						<div class="formControls col-xs-8 col-sm-9">
							<textarea name="attr_value" cols="" rows="" class="textarea"  placeholder="一行代表一个可选值" disabled="" ></textarea>
							
						</div>
					</div>




				</div>


	
			</div>
			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
				</div>
			</div>
		</form>
	</div>
</section>
<!--_footer 作为公共模版分离出去--> 
<?php $this->load->view('public/footer.html');?>
<!--/_footer /作为公共模版分离出去--> 

<!--请在下方写此页面业务相关的脚本--> 
<script type="text/javascript" src="<?php echo base_url(),ADMIN_DIR?>/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="<?php echo base_url(),ADMIN_DIR?>/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="<?php echo base_url(),ADMIN_DIR?>/lib/jquery.validation/1.14.0/messages_zh.js"></script> 
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});

	$.Huitab("#tab-category .tabBar span","#tab-category .tabCon","current","click","0");

	

});


  /**
 * 点击类型按钮时切换选项的禁用状态
 */
function radioClicked(n)
{
  document.forms['theForm'].elements["attr_value"].disabled = n > 0 ? false : true;
}


</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>